<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>07_数据双向绑定</title>
</head>
<body>
  <div id="app">
    <input type="text" v-model="msg">
    <p>{{msg}}</p>
  </div>
  <script src="./js/observer.js"></script>
  <script src="./js/watcher.js"></script>
  <script src="./js/compile.js"></script>
  <script src="./js/mvvm.js"></script>
  <script>
    /*
      v-model:
        给元素设置value属性，值就是表达式的值  model --> view
        绑定了input事件，将来输入数据时可以收集到数据，更新相应表达式值 view --> model
    */
    debugger;
    new MVVM({
      // el: "#app",
      el: document.getElementById("app"),
      data: {
        msg: 'hello'
      },
    })
  </script>
</body>
</html>
